1. Field of the Invention
The present invention relates to performing arithmetic operations on interval operands within a computer system. More specifically, the present invention relates to a method and an apparatus for using a computer system to solve a nonlinear equation through interval arithmetic and term consistency.
2. Related Art
Rapid advances in computing technology make it possible to perform trillions of computational operations each second. This tremendous computational speed makes it practical to perform computationally intensive tasks as diverse as predicting the weather and optimizing the design of an aircraft engine. Such computational tasks are typically performed using machine-representable floating-point numbers to approximate values of real numbers. (For example, see the Institute of Electrical and Electronics Engineers (IEEE) standard 754 for binary floating-point numbers.)
In spite of their limitations, floating-point numbers are generally used to perform most computational tasks.
One limitation is that machine-representable floating-point numbers have a fixed-size word length, which limits their accuracy. Note that a floating-point number is typically encoded using a 32, 64 or 128-bit binary number, which means that there are only 232, 264 or 2128 possible symbols that can be used to specify a floating-point number. Hence, most real number values can only be approximated with a corresponding floating-point number. This creates estimation errors that can be magnified through even a few computations, thereby adversely affecting the accuracy of a computation.
A related limitation is that floating-point numbers contain no information about their accuracy. Most measured data values include some amount of error that arises from the measurement process itself. This error can often be quantified as an accuracy parameter, which can subsequently be used to determine the accuracy of a computation. However, floating-point numbers are not designed to keep track of accuracy information, whether from input data measurement errors or machine rounding errors. Hence, it is not possible to determine the accuracy of a computation by merely examining the floating-point number that results from the computation.
Interval arithmetic has been developed to solve the above-described problems. Interval arithmetic represents numbers as intervals specified by a first (left) endpoint and a second (right) endpoint. For example, the interval [a, b], where a less than b, is a closed, bounded subset of the real numbers, R, which includes a and b as well as all real numbers between a and b. Arithmetic operations on interval operands (interval arithmetic) are defined so that interval results always contain the entire set of possible values. The result is a mathematical system for rigorously bounding numerical errors from all sources, including measurement data errors, machine rounding errors and their interactions. (Note that the first endpoint normally contains the xe2x80x9cinfimumxe2x80x9d, which is the largest number that is less than or equal to each of a given set of real numbers. Similarly, the second endpoint normally contains the xe2x80x9csupremumxe2x80x9d, which is the smallest number that is greater than or equal to each of the given set of real numbers.)
One commonly performed computational operation is to find the roots of a nonlinear equation. This can be accomplished using Newton""s method. The interval version of Newton""s method works in the following manner. From the mean value theorem,
ƒ(x)xe2x88x92ƒ(x*)=(xxe2x88x92x*)ƒxe2x80x2("xgr"),
where "xgr" is some generally unknown point between x and x*. If x* is a zero of f, then ƒ(x*)=0 and, from the previous equation,
x*=xxe2x88x92ƒ(x)/ƒxe2x80x2("xgr").
Let X be an interval containing both x and x*. Since "xgr" is between x and x*, it follows that "xgr"xcex5X. Moreover, from basic properties of interval analysis it follows that ƒxe2x80x2("xgr")xcex5ƒxe2x80x2(X). Hence, x*xcex5 N(x,X) where
N(x,X)=xxe2x88x92ƒ(x)/ƒxe2x80x2(X).
Temporarily assume 0∉ƒxe2x80x2(X) so that N(x,X) is a finite interval. Since any zero of f in X is also in N(x,X), the zero is in the intersection X∩ N(x,X). Using this fact, we define an algorithm for finding zero x*. Let X0 be an interval containing x*. For n=0, 1, 2, . . . , define
Xn=m(Xn)
N(xn,Xn)=xnxe2x88x92ƒ(xn)/ƒxe2x80x2(Xn)
Xn+1=Xn∩N(xn,Xn),
wherein m(X) is the midpoint of the interval X. We call xn the point of expansion for the Newton method. It is not necessary to choose xn to be the midpoint of Xn. The only requirement is that xnxcex5Xn to assure that x*xcex5N(xn,Xn). However, it is convenient and efficient to choose xn=m(Xn). Note that the roots of an interval equation can be intervals rather than points when the equation contains non-degenerate interval constants or parameters.
One problem in using the interval version of Newton""s method is that performing each interval Newton step requires a large number of computational operations. Furthermore, the interval version of Newton""s method typically does not converge rapidly when the initial interval X0 is wide.
What is needed is a method and an apparatus that efficiently finds the roots of a nonlinear equation without the above-described problems of using Newton""s method.
One embodiment of the present invention provides a system for solving a nonlinear equation through interval arithmetic. During operation, the system receives a representation of the nonlinear equation ƒ(x)=0, as well as a representation of an initial interval, X, wherein this representation of X includes a first floating-point number, XL, for the left endpoint of X and a second floating-point number, XU, for the right endpoint of X. Next, the system symbolically manipulates the nonlinear equation ƒ(x)=0 to solve for a first term, g1(x), thereby producing a modified equation g1(x)=h1(x), such that g1(x)xe2x88x92h1(x)=0 is analytically equivalent to ƒ(x)=0, wherein the first term g1(x) can be analytically inverted to produce an inverse function g1xe2x88x921(x). The system then plugs the initial interval X into the modified equation to produce the equation g1(Xxe2x80x2)=h1(X), and solves for Xxe2x80x2=g1xe2x88x921[h1(X)]. Next, the system intersects Xxe2x80x2 with the initial interval X to produce a new interval X+, wherein the new interval X+ contains all solutions of the equation ƒ(x)=0 within the initial interval X, and wherein the size of the new interval X+ is less than or equal to the size of the initial interval X.
In one embodiment of the present invention, the system additionally sets X=X+, and repeats the process of symbolically manipulating, plugging, solving and intersecting to produce a new interval X+ for a second term g2(x)=h2(x), wherein the second term g2(x) can be analytically inverted to produce an inverse function g2xe2x88x921.
In one embodiment of the present invention, for each term, g1(x), that can be analytically inverted within the equation ƒ(x)=0, the system sets X=X+, and repeats the process of symbolically manipulating, plugging, solving and intersecting to produce a new interval X+.
In one embodiment of the present invention, the system additionally performs an interval Newton step on the function ƒ(x)=0 and the initial interval X to narrow the set of interval solutions to the equation ƒ(x)=0.
In one embodiment of the present invention, symbolically manipulating the nonlinear equation ƒ(x)=0 involves first selecting the invertible term, g1(x), as the term that dominates the function ƒ(x)=0 within the interval X.
In one embodiment of the present invention, receiving the representation of the nonlinear equation ƒ(x)=0 involves symbolically manipulating an inequality to produce the nonlinear equation ƒ(x)=0.
In one embodiment of the present invention, the system is part of an optimization system.